package com.example.consumer.mq;

import org.springframework.amqp.rabbit.annotation.Exchange;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.QueueBinding;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

import lombok.extern.slf4j.Slf4j;

/**
 * \* @author: bear
 * \* Date: 2022-04-08-15:12
 * \* describe:
 */
@Component
@Slf4j
public class RabbitMqTest {

	@RabbitListener(bindings = @QueueBinding(
			value = @Queue("myQueue"),
			exchange = @Exchange("myChange")
	))
	public void process(Object message){
		log.info("rabbitMQ收到的消息：{}",message);
	}
}
